Skip to main content

SetVServerGroupAttribute

Description

call SetVServerGroupAttribute to modify the configuration of the virtual server group.

Request Method

POST

Request Path

/apsara/route/Slb/SetVServerGroupAttribute

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
VServerGroupIdBODYstringYesrsp-cige6****backend server group ID.
regionIdBODYstringYesNo sample value for this parameter.region id
VServerGroupNameBODYstringNovserver-group-testvirtual server group name.
RegionIdBODYstringYescn-qingdao-env17-d01load balancing region ID.
BackendServersBODYstringNo[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.XX.XX. 6", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.XX.XX. 6", "Port":"80","Description":"test-113" }]virtual server group list. a single call can add up to 20 back-end servers. ServerId:String type, required, instance ID of backend server or ENI instance ID. Port:Integer type, required, port used by backend server, value range:1~65535. Weight:Integer type, required, weight of backend server, value range:0~100. Description :String type, optional, backend server description, 1-80 characters in length, allow letters, numbers, dashes (-), forward slashes (/), half-width periods (.), and underscores (_). Chinese is supported. Type:String type, indicating the instance type of the backend server, value: ecs(default):ECS instance. eni: ENI instance. ServerIp: the instance IP of ECS or ENI. The example is as follows: example of mounting ECS:[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port": "80", "Description": "test-112" }] mount ENI:[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port": "80", "Description": "test-112" }] mount ENI multi-IP:[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port": "80", "Description": "test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Port": "80", "Description": "test-113" }]
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
VServerGroupIdstringrsp-cige6****server group ID.
Typestringecsbackend server type, value: ecs(default):ECS instance. eni: ENI instance.
ServerIdstringi-bp1ek6yd7jvkx****ECS instance ID or ENI instance ID.
Descriptionstringbackend server group description.backend server group description.
RequestIdstring9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18Crequest ID.
BackendServerNo sample value for this parameter.No description for this parameter.
Portinteger70the port used by the backend server.
VServerGroupNamestringGroup1virtual server group name.
BackendServersarray of backendserverNo sample value for this parameter.backend server list.
Weightinteger100the weight of the back-end server.

Example

Successful Response example

{
"VServerGroupId":"rsp-cige6****",
"Type":"ecs",
"ServerId":"i-bp1ek6yd7jvkx****",
"Description":"backend server group description.",
"RequestId":"9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
"BackendServer":"",
"Port":"70",
"VServerGroupName":"Group1",
"BackendServers":"",
"Weight":"100"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}